<template>
  <view class="disFlxAC gap-8 flexEnd" @click="toEditBusinessOpportunitiesDetail">
    <text class="fz-14 linh-20" style="color: #999996">
      {{
        modelValue
          ? '已填写'
          : `详细介绍一下${boType === BoTypeEnum.Supply ? '供应' : '需求'}内容吧~`
      }}
    </text>
    <text class="ali-icon icon-you1 fz-16" style="color: #999996"></text>
  </view>
</template>
<script setup lang="ts">
  import { BoTypeEnum } from '@/enums/businessOpportunitiesEnum';
  import { navigateTo } from '@/router';
  import type { PropType } from 'vue';
  const props = defineProps({
    modelValue: {
      type: String,
      default: '',
    },
    boType: Number as PropType<BoTypeEnum>,
  });

  const emits = defineEmits(['update:modelValue']);

  const toEditBusinessOpportunitiesDetail = () => {
    navigateTo({
      name: 'editBusinessOpportunitiesDetail',
      options: {
        editBusinessOpportunitiesDetail: props.modelValue,
        boType: props.boType!,
        successFn: function (str: string): void {
          emits('update:modelValue', str || '');
        },
      },
    });
  };
</script>
<style lang="scss" scoped></style>
